Hi Driggers,
Today I can finally make a very cool code available to all of you, and my hopes are that drigg maintainers will incorporate a derivative of this this into the standard versions of drigg in future releases.
You all use Digg.com, so you know that most of the times when you click on an embedded video thumbnail, it will open up and automatically play inside a Lightbox, whithout you being redirected to a new page.
Many months ago I had posted a feature request asking for exactly that, but little came out of it.
I then contacted the maintainer of Lightbox2, and she made Lightbox2 work for embedded videos too with a simple addition of rel="lightvideo" inside the code. It almost worked but was not 100%: when videos would open up, they would not autoplay. And most importantly, this would require setting Lightbox as a full version (rather than just "Lite"), which, for some reason crashes IE6 on the node pages where a YouTube video is embedded (my theme where this IE6 crashing happens is based on drigg_theme, and I also use JS aggregator module).
Then came along d0t101101 user. He had put together exactly what I was looking for, but with the help of Shadowbox, which works without any hitch or glitch. It opens up in a nice Shadowbox, and starts autoplaying the video.
So the original code was modified by d0t10101 for a website that he no longer works on. At that time he asked me not to make it available out into the open until he he completes his project. Months have passed and with every new release of Drigg, I would do the painstaking task of "forking" myself. Now I have spoken to d0t101101 and since it is mainly his moification he aggreed to my proposal to make it available out into the open for drigg maintainers to incorporate something like this into the future stadard versions of Drigg 5x and 6x.
I'm attaching my version of drigg_embed submodule as it appears on my live site. It is based on Drigg_5x_1.36 (so it also includes the audio embed), but with MY OWN modifications (and I'm not a coder) taken mostly from d0t101101's modifications. As far as I'm concerned, what is attached below works like a clockwork!
If maintainers of Drigg want to incorporate this into future standard releases of Drigg, that would be totally cool and would benefit many many drigg powered sites. If so, I would suggest that this module is adopted to work with Lightbox2 (but that would mean also resolving the autoplay and IE6 crash issue which occurs in full-version of Lightbox2 in themes that are based on drigg_theme). It would also absolutely rock if the extra_voting_forms voting buttons and karma score would also appear below the video, like it does on digg.com -- so that people can vote for that video right there and then.
Merc has expressed the willingness to adopt this into the standard, so let's keep our fingers crossed.
If not... at least I hope that Drigg community will find this shadowbox feature useful in making their sites uber-kool.
So here's the code. It's all yours - do with it what you like. Hopefully you will adopt it into a standard.
| Comment | File | Size | Author |
|---|---|---|---|
| drigg_embed.zip | 60.39 KB | drupalina |
Comments
Comment #1
mercmobily commentedHi,
Hang on... this is cool! Is this totally compatible with the "old" version of the module?
Merc.
Comment #2
drupalina commentedYep ;) Totally compatible!
This is basically Drigg_embed_5x_1.36 carefully interweaved with my & d0t101101's original Shadowbox version of Drigg_embed. AND it also includes one extra service not originally in Drigg_embed (I think it's called Hulu or could be some other one).
Just test ride it and you'll see.
I only changed a little tiny bit in the audio embed, so that it embeds the MP3 player in the teaser too rather than just show an obscure audio icon in the teaser.
Other than that, this is a good to go module (of course with the limitations of 5x_1.36).
But, once Lightbox2 and Drigg_theme can start working together (see this problem) I was hoping that it would be better to adopt Lightbox's tag rel="lightvideo" for the _Standard_ future Drigg releases. I don't know what's lighter in terms of javascript: Shadowbox or Lightbox??? (I know that Thickbox, for instance, is pretty heavy.
What would also be cool is if the Karma voting widget would display below the video while the Shadowbox/Lightbox opens up, like it does on Digg.com
Comment #3
nightowl_oo commentedCan you please post simple directions on how to use your files please.
I have installed the shadowbox module and uploaded your files but shadowbox is not working.
Thanks
Comment #4
drupalina commentedThis is as simple as a replacement for the current Drigg_Embed sub-module. No need to install the Shadowbox module because a shadowbox directory is already included inside this forlder
Directions:
1) Backup and delete your existing Drigg_Enbed submodule in your Drigg directory
2) Drop the attached folder into the Drigg folder where Drigg_embed submodule must normally be
3) Check that your Drigg_embed setings are to your liking.
Post any YouTube of any other suppoorted video... and when you are in a teaser view, click on that video's thumbnail .. voila.. enjoy ;)
Comment #5
mercmobily commentedHi,
Hummmmm... I am after something that works _with_ Shadowbox, rather than _include_ a _fork_ of it :-(
Do you know if d0t101101 http://drupal.org/user/147742 wants to work with me to turn this as something that detects if Shadowbox is installed, and if it is it uses it?
Merc.
Comment #6
drupalina commentedHi,
In the reply to my e-mail where I asked for his/her permission to make it available to the world, d0t101101 said that he was very-very busy right now, but that if you needed help in making it work better with Shadowbox and/or especially Lightbox, that he would be willing to help. So, Yes!
And he was happy that his work benefitted someone.
Why not contact him?
Comment #7
philbar commented